package com.jingdianjichi.practice.server.mapper;

import com.jingdianjichi.practice.server.entity.po.PracticeDetailPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PracticeDetailDao {
    /**
     * 根据练习id，题目id，查询详情
     */
    PracticeDetailPO selectDetail(@Param("practiceId") Long practiceId,
                                  @Param("subjectId") Long subjectId,
                                  @Param("loginId") String loginId);



    /**
     * 获取正确答案数量
     */
    int selectCorrectCount(Long practiceId);

    List<PracticeDetailPO> selectByPracticeId(Long practiceId);

    void insertSingle(PracticeDetailPO practiceDetailPO);
}
